<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //Windows窗口对象

        //方法演示 alert
        window.alert("Hello windows.....");
        alert("hello Windows");

        // comfirm --确认提示框，点击确定返回true，点击取消返回false
        let flag = confirm("宁确定要删除吗?");
        console.log(flag);

        let i = 0;
        setInterval(() => {
            i++;
            console.log("定时器执行"+i+"次");
        }, 1000);

        // setTimeout --延迟定时器，只会触发一次
        setTimeout(()=> {
            console.log("三秒时间到！");
        },3000);

        //Location地址栏对象
        //window.location
        alert(location.href);
        //设置url地址--页面会自动跳转
        location.href = "https://www.itcast.cn";
    </script>
</body>
</html>